package com.kgc.server.service;

import com.kgc.server.pojo.Collection;
import com.kgc.server.pojo.EasybuyCar;
import com.kgc.server.pojo.EasybuyProduct;
import com.kgc.server.pojo.Page;
import com.kgc.server.util.ResponseMessage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductService {
    public List getProductList(Page page);

    public int delProductListById(int id);
    /**
     * 添加商品到solr
     */
    public ResponseMessage addProductToSole();

    /**
     * 添加单个商品
     */
//    public ResponseMessage addProduct(EasybuyProduct easybuyProduct);


    /**
     * 获取全部商品
     * @return
     */
    public ResponseMessage  getAllProduct();

    /**
     * 根据id获得product
     * @param id
     * @return
     */
    public ResponseMessage getProductById(String id);

    /**
     * 添加商品
     */
    public ResponseMessage addProduct(EasybuyProduct easybuyProduct);


    public List getProductListById(int id);

    public int updataProductListById(EasybuyProduct product);

    /**
     * 从solr里查询商品
     */
    public ResponseMessage getProductForSolr(Integer getCategoryLevel1Id,Integer getCategoryLevel3Id,String name,Integer pageNo);


    public boolean setGoodsCollection(int goodsID,int UserID);

    boolean delGoodsCollection(int goodsID,int userID);

    /**
     * 判断商品库存够不够
     */
    public ResponseMessage stockIsEnough(String userId);
    public boolean getCollection(int goodsID, int userID);

    public List getUserProductListByUserId(int userID);

    public List getCollectionFy(Page page,int userID);

    public int delCollectionByUserIdORID(int userID,int goodsID);

    public List getCollectionAll(int userID);
}
